import request from '@/utils/request'

let pos = {
    appStatisPosAct: '/terminal/appStatisPosAct', // 终端统计-唤醒、绑定
    posCount: '/posStatistic/posCount', // 终端统计
    findByPosSn: '/policyActConfig/findByPosSn', //按照POS_SN号查询活动
    expectActivity: '/terminal/expectActivity', //终端活动预设
    getPosDetail: '/terminal/getPosDetail', //查询终端详情
    customerFeeTimeMSD: '/custFee/customerFeeTimeMSD', //商户费率回归期限
    unbind: '/terminal/unbind', //终端解绑
    tounbind: '/terminal/findCustPhone', // 终端解绑手机号获取
    bind: '/terminal/bind', //终端绑定
    hasAct: '/terminal/hasAct', //是否已经唤醒
    findPageList: '/terminal/findPageList', //终端管理列表
    findPageListCount: '/terminal/findPageListCount', //终端管理数
    findCanallotBackCount: '/posAssign/findCanallotBackCount', //可回拨终端数
    getPosUseType: '/terminal/getPosUseType', //终端使用方式
    findAll: '/marktingConfig/findByTargetAndClassesId', //根据营销类别查询所有活动
    allot: '/posAssign/allot', //终端调拨
    findByCanAllotCount: '/posAssign/findByCanAllotCount', //终端调拨：划拨
    terminalFeeInterval: '/custFee/terminalFeeInterval', //获取终端费率区间
    findSetPosActListCount: '/terminal/findSetPosActListCount', //获取批量设置活动终端数量
    findSetPosActList: '/terminal/findSetPosActList', //获取批量设置终端活动的列表
    findSetPosFeeListCount: '/terminal/findSetPosFeeListCount', //获取批量设置终端费率台数
    findSetPosFeeList: '/terminal/findPosFeePageList', //获取批量设置终端费率列表
    posFeeConfigBatch: '/terminal/posFeeConfigBatch', //批量设置费率
    findSetPosSimAct: '/policyActConfig/findByParam', //查询sim卡的终端活动
    findSetPosSimListCount: '/terminal/findSetPosSimListCount', //查询sim卡的终端活动
    findSetPosSimList: '/terminal/findSetPosSimList', //查询sim卡的终端活动
    findByCanAllot: '/posAssign/findByCanAllot', //查询终端可调拨列表
    findCanallotBack: '/posAssign/findCanallotBack', //查询sim卡的终端活动
    allotBackApply1: '/posAssign/allotBackApply', //回拨接口
    allotRecord: '/posAssign/allotRecord', //调拨记录
    allotDetail: '/posAssign/allotDetail', //调拨明细
    checkCanSimConfig: '/terminal/checkCanSimConfig', //是否可设置sim
    allotBackRecordBySource: '/posAssign/allotBackRecordBySource', //回拨  我发起的
    allotBackRecordByTarget: '/posAssign/allotBackRecordByTarget', //回拨  别人向我发起的
    allotBackConfirm: '/posAssign/allotBackConfirm', //回拨  别人向我发起的
    findByPosDeposit: '/terminal/findByPosDeposit', //获取设置活动列表
    findByPosDepositCount: '/terminal/findByPosDepositCount', //获取批量设置活动列表数量
    allotBackRecord: '/posAssign/allotBackRecord', //调拨明细
    transAvgQuery: '/transStatistic/transAvgQuery' //获取台均交易
}
export function appStatisCust(data) {
    return request({
        url: pos.appStatisCust,
        method: 'get',
        data
    })
}
export function findPageListCount(data) {
    return request({
        url: '/terminal/findPageListCount',
        method: 'get'
    })
}
export function findByCanAllotCount(data) {
    return request({
        url: '/posAssign/findByCanAllotCount',
        method: 'get',
        data
    })
}
export function findCanallotBackCount(data) {
    return request({
        url: '/posAssign/findCanallotBackCount',
        method: 'get',
        hideLoading: true,
        data
    })
}

export function downRegulationPoints(data) {
    return request({
        url: pos.downRegulationPoints,
        method: 'post',
        data
    })
}
export function posCountStatistic(data) {
    return request({
        url: '/profitStatisticTwo/posCountStatistic',
        method: 'get',
        params: data
    })
}
export function upRegulationPoints(data) {
    return request({
        url: pos.upRegulationPoints,
        method: 'post',
        data
    })
}
export function queryPointsHis(data) {
    return request({
        url: pos.queryPointsHis,
        method: 'post',
        data
    })
}

export function pointsBal(data) {
    return request({
        url: pos.pointsBal,
        method: 'post',
        data
    })
}

export function transAvgQuery(data) {
    return request({
        url: pos.transAvgQuery,
        method: 'get',
        data
    })
}
export function toview1(data) {
    return request({
        url: pos.toview1,
        method: 'post',
        data
    })
}
export function appStatisPosAct(data) {
    return request({
        url: pos.appStatisPosAct,
        method: 'get',
        data
    })
}
export function findSetPosFeeListCount(data) {
    return request({
        url: pos.findSetPosFeeListCount,
        method: 'post',
        hideLoading: true,
        data
    })
}
export function findSetPosActListCount(data) {
    return request({
        url: pos.findSetPosActListCount,
        method: 'get',
        hideLoading: true,
        data
    })
}
export function checkCanSimConfig(data) {
    return request({
        url: pos.checkCanSimConfig,
        method: 'post',
        params: data
    })
}

export function findSetPosSimAct(data) {
    return request({
        url: pos.findSetPosSimAct,
        method: 'post',
        data
    })
}
export function setPosSimDeduct(data) {
    return request({
        url: pos.setPosSimDeduct,
        method: 'post',
        data
    })
}
export function findSetPosSimList(data) {
    return request({
        url: pos.findSetPosSimList,
        method: 'post',
        data
    })
}
export function findSetPosSimListCount(data) {
    return request({
        url: pos.findSetPosSimListCount,
        method: 'post',
        data
    })
}
export function posCountCategory(data) {
    return request({
        url: pos.posCountCategory,
        method: 'get',
        data
    })
}
export function posPageCountCategory(data) {
    return request({
        url: pos.posPageCountCategory,
        method: 'get',
        data
    })
}
export function wechatpay(data) {
    return request({
        url: pos.wechatpay,
        method: 'post',
        data
    })
}
export function delectAddress(data) {
    return request({
        url: pos.delectAddress,
        method: 'get',
        data
    })
}
export function setDetailAddress(data) {
    return request({
        url: pos.setDetailAddress,
        method: 'get',
        data
    })
}
export function editAddress(data) {
    return request({
        url: pos.editAddress,
        method: 'post',
        data
    })
}
export function addresses(data) {
    return request({
        url: pos.addresses,
        method: 'post',
        data
    })
}
export function price(data) {
    return request({
        url: pos.price,
        method: 'post',
        data
    })
}
export function type(data) {
    return request({
        url: pos.type,
        method: 'post',
        data
    })
}

// 可采购终端查询
export function posList(data) {
    return request({
        url: '/posSales/findBySaleTarget',
        method: 'post',
        data
    })
}

// 查询收款信息
export function getPayBankAccountInfo(data) {
    return request({
        url: '/posSales/getPayBankAccountInfo',
        method: 'post',
        data
    })
}
//  //查询默认地址
export function findDefault(data) {
    return request({
        url: '/posSalesAddress/findDefault',
        method: 'post',
        data
    })
}

//保存销售单
export function saveBill(data) {
    return request({
        url: '/posSales/saveBill',
        method: 'post',
        data
    })
}
//销售单列表查询（待付款，线下支付，完成）
export function posSalesQuery(data) {
    return request({
        url: '/posSales/query',
        method: 'get',
        data
    })
}
////出库单列表查询（待发货，待收货）
export function posStoreOut(data) {
    return request({
        url: '/posStoreOut/query',
        method: 'get',
        data
    })
}
//销售单详情w
export function salesBillDetail(data) {
    return request({
        url: '/posSales/salesBillDetail',
        method: 'get',
        data
    })
}
//获取机具统计
export function posTypeCountStatistic(data) {
    return request({
        url: '/profitStatisticTwo/posTypeCountStatistic',
        method: 'get',
        data
    })
}
export function posTypeStatusCountStatistic(data) {
    return request({
        url: '/profitStatisticTwo/posTypeStatusCountStatistic',
        method: 'get',
        params: data
    })
}
export function posActivateCountStatistic(data) {
    return request({
        url: '/profitStatisticTwo/teamPosActivateStatistic',
        method: 'get',
        params: data
    })
}
// 交易唤醒趋势
export function teamPosActivateTrendStatistic(data) {
    return request({
        url: '/profitStatisticTwo/teamPosActivateTrendStatistic',
        method: 'get',
        params: data
    })
}
// 团队机具统计
export function teamAgentPosStatistic(data) {
    return request({
        url: '/profitStatisticTwo/teamAgentPosStatistic',
        method: 'get',
        params: data
    })
}
export function posActivateDetailStatistic(data) {
    return request({
        url: '/profitStatisticTwo/posActivateDetailStatistic',
        method: 'get',
        params: data
    })
}
export function posAgentActivateDetailStatistic(data) {
    return request({
        url: '/profitStatisticTwo/posAgentActivateDetailStatistic',
        method: 'get',
        params: data
    })
}
